home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / PInterfaces / TELEPHONES.p < prev    next >
Encoding:
Text File  |  1996-09-06  |  44.1 KB  |  943 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Telephones.p
  3.  
  4.      Contains:    Interface to the Telephone Manager
  5.  
  6.      Version:    
  7.  
  8.      DRI:        Samir Dharia
  9.  
  10.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  11.                  All rights reserved.
  12.  
  13.      Warning:    *** APPLE INTERNAL USE ONLY ***
  14.                  This file may contain unreleased API's
  15.  
  16.      BuildInfo:    Built by:            Sue Kuo
  17.                  With Interfacer:    1.1d11  
  18.                  From:                Telephones.i
  19.                      Revision:        17
  20.                      Dated:            12/13/94
  21.                      Last change by:    ngk
  22.                      Last comment:    <Really SRD> Add telUnknown and telTerminalHWDisconnected
  23.  
  24.      Bugs:        Report bugs to Radar component “System Interfaces”, “Latest”
  25.                  List the version information (from above) in the Problem Description.
  26.  
  27. }
  28.  
  29. {$IFC UNDEFINED UsingIncludes}
  30. {$SETC UsingIncludes := 0}
  31. {$ENDC}
  32.  
  33. {$IFC NOT UsingIncludes}
  34.  UNIT Telephones;
  35.  INTERFACE
  36. {$ENDC}
  37.  
  38. {$IFC UNDEFINED __TELEPHONES__}
  39. {$SETC __TELEPHONES__ := 1}
  40.  
  41. {$I+}
  42. {$SETC TelephonesIncludes := UsingIncludes}
  43. {$SETC UsingIncludes := 1}
  44.  
  45.  
  46. {$IFC UNDEFINED __TYPES__}
  47. {$I Types.p}
  48. {$ENDC}
  49. {    ConditionalMacros.p                                            }
  50.  
  51. {$IFC UNDEFINED __WINDOWS__}
  52. {$I Windows.p}
  53. {$ENDC}
  54. {    Memory.p                                                    }
  55. {        MixedMode.p                                                }
  56. {    Quickdraw.p                                                    }
  57. {        QuickdrawText.p                                            }
  58. {    Events.p                                                    }
  59. {        OSUtils.p                                                }
  60. {    Controls.p                                                    }
  61. {        Collections.p                                            }
  62. {        Appearance.p                                            }
  63. {            Files.p                                                }
  64. {        Menus.p                                                    }
  65. {            TextObjects.p                                        }
  66. {                Unicode.p                                        }
  67. {    AppleEvents.p                                                }
  68. {        Errors.p                                                }
  69. {        EPPC.p                                                    }
  70. {            AppleTalk.p                                            }
  71. {            PPCToolbox.p                                        }
  72. {            Processes.p                                            }
  73. {        Notification.p                                            }
  74. {            Kernel.p                                            }
  75. {                MachineExceptions.p                                }
  76. {                Timing.p                                        }
  77. {    Drag.p                                                        }
  78. {        TextEdit.p                                                }
  79.  
  80. {$IFC UNDEFINED __DIALOGS__}
  81. {$I Dialogs.p}
  82. {$ENDC}
  83.  
  84. {$IFC UNDEFINED __CTBUTILITIES__}
  85. {$I CTBUtilities.p}
  86. {$ENDC}
  87. {    StandardFile.p                                                }
  88.  
  89. {$IFC UNDEFINED __COMPONENTS__}
  90. {$I Components.p}
  91. {$ENDC}
  92.  
  93. {$PUSH}
  94. {$ALIGN MAC68K}
  95. {$LibExport+}
  96. {$IFC UNDEFINED classTEL }
  97.  
  98. CONST
  99. { telephone tool file type }
  100.     classTEL                    = 'vbnd';
  101.  
  102. {$ENDC}
  103.  
  104. CONST
  105. {    curTELVersion = 4,                        not supported. Use TELGetTELVersion to get the
  106.                                             current version of the Telephone Manager }
  107.     telChooseDisaster            = chooseDisaster;
  108.     telChooseFailed                = chooseFailed;
  109.     telChooseAborted            = chooseAborted;
  110.     telChooseOKMinor            = chooseOKMinor;
  111.     telChooseOKMajor            = chooseOKMajor;
  112.     telChooseCancel                = chooseCancel;
  113. {    the chooseXXX symbols are defined in CTBUtilities.(pah) }
  114.     telChooseOKTermChanged        = 4;
  115.  
  116. { PHYSICAL TERMINAL CONSTANTS 
  117.  
  118. * INDEPENDENT HANDSET CONSTANTS }
  119.     telIndHSOnHook                = 0;                            { independent handset on hook }
  120.     telIndHSOffHook                = 1;                            { independent handset off hook }
  121.     telIndHSDisconnected        = 0;                            { handset disconnected from the line }
  122.     telIndHSConnected            = 1;                            { handset connected to the line }
  123. { HOOK STATE CONSTANTS }
  124.     telHandset                    = 1;                            { handset hookswitch }
  125.     telSpeakerphone                = 2;                            { speakerphone 'on' switch }
  126.     telDeviceOffHook            = 1;                            { device off hook }
  127.     telDeviceOnHook                = 0;                            { device on hook }
  128. { VOLUME CONTROL CONSTANTS }
  129.     telHandsetSpeakerVol        = 1;                            { volume of the handset speaker }
  130.     telHandsetMicVol            = 2;                            { sensitivity of the handset mic }
  131.     telSpeakerphoneVol            = 3;                            { speakerphone volume }
  132.     telSpeakerphoneMicVol        = 4;                            { sensitivity of the spkrphone mic }
  133.     telRingerVol                = 5;                            { volume of the ringer }
  134.     telBuiltinSPVol                = 6;                            { volume of the built-in speakerphone }
  135.     telBuiltinSPMicVol            = 7;                            { sensitivity of the built-in speakerphone mic }
  136.     telVolSame                    = 0;                            { leaves the volume at previous level }
  137.     telVolMin                    = 1;                            { turns volume down to minimum level, but not off }
  138.     telVolMax                    = 100;                            { highest level allowed by the Telephone Manager }
  139.     telVolStateSame                = 0;                            { leaves device in same state }
  140.     telVolStateOff                = 1;                            { turns the device off , 
  141.                                  * but doesn't change the volume setting. 
  142.                                  * Use for mute functions. }
  143.     telVolStateOn                = 2;                            { turns the device on.  Volume setting is 
  144.                                  * the same as previously set.}
  145. { DISPLAY CONSTANTS }
  146.     telNormalDisplayMode        = 1;                            { normal display mode }
  147.     telInspectMode                = 2;                            { inspect display mode }
  148.     telMiscMode                    = 3;                            { miscellaneous display mode }
  149.     telRetrieveMode                = 4;                            { message retrieval mode }
  150.     telDirectoryQueryMode        = 5;                            { electronic directory mode }
  151.     telEntireDisplay            = 0;                            { entire Display }
  152. { KEY PRESS CONSTANTS }
  153.     telHangupKey                = 1;                            { drop, or release, key pressed }
  154.     telHoldKey                    = 2;                            { hold key pressed }
  155.     telConferenceKey            = 3;                            { conference key pressed }
  156.     telTransferKey                = 4;                            { transfer key pressed }
  157.     telForwardKey                = 5;                            { call forward key pressed }
  158.     telCallbackKey                = 6;                            { call back key pressed }
  159.     telDNDKey                    = 7;                            { do not disturb key pressed }
  160.     telCallPickupKey            = 8;                            { call Pickup key pressed }
  161.     telCallParkKey                = 9;                            { call Park key pressed }
  162.     telCallDeflectKey            = 10;                            { call Deflect key pressed }
  163.     telVoiceMailAccessKey        = 11;                            { voice Mail Access key pressed }
  164.     telCallRejectKey            = 12;                            { call Reject key pressed }
  165.     telOtherKey                    = 16;                            { other key pressed }
  166.     telKeyPadPress                = 1;                            { key pressed on 12 digit keypad}
  167.     telFeatureKeyPress            = 2;                            { feature Key Pressed }
  168.     telTerminalEnabled            = 0;
  169.     telTerminalDisabled            = 1;
  170.     telUnknown                    = 0;                            { unknown error }
  171.     telTerminalHWDisconnected    = 1;                            { terminal hardware is disconnected }
  172.     telDeviceDriverClosed        = 2;                            { device driver is closed }
  173. { ALERT PATTERN }
  174.     telPattern0                    = 0;
  175.     telPattern1                    = 1;
  176.     telPattern2                    = 2;
  177.     telPattern3                    = 3;
  178.     telPattern4                    = 4;
  179.     telPattern5                    = 5;
  180.     telPattern6                    = 6;
  181.     telPattern7                    = 7;
  182.     telPatternOff                = 8;
  183.     telPatternUndefined            = 15;
  184. { DN TYPES }
  185.     telAllDNs                    = 0;                            { counts all types of DNs }
  186.     telInternalDNs                = 1;                            { connected to PBX or other non-public switch }
  187.     telInternalDNsOnly            = 2;                            { connected to PBX or other non-public switch 
  188.                                  * and able to place internal calls only }
  189.     telExternalDNs                = 3;                            { connected to public network }
  190.     telDNTypeUnknown            = 4;                            { DN type unknown }
  191. { DN USAGE }
  192.     telDNNotUsed                = 0;                            { DN is not used - onhook }
  193.     telDNPOTSCall                = 1;                            { DN used for POTs call }
  194.     telDNFaxCall                = 2;                            { DN used for fax call }
  195.     telDNDataCall                = 3;                            { DN used for data call }
  196.     telDNAlerting                = 4;                            { Incoming call at DN }
  197.     telDNUnknownState            = 5;                            { DN is in unknown state }
  198. { CALL FORWARDING TYPES }
  199.     telForwardImmediate            = 1;                            { immediately forward calls }
  200.     telForwardBusy                = 2;                            { forward on Busy }
  201.     telForwardNoAnswer            = 3;                            { forward on No answer }
  202.     telForwardBusyNA            = 4;                            { forwarding for busy and no answer}
  203.     telForwardTypeUnknown        = 5;                            { type of forwarding is unknown }
  204. { CALL FORWARDING MESSAGES }
  205.     telForwardCleared            = 0;                            { forwarding has been cleared }
  206.     telForwardEst                = 1;                            { forwarding has been established}
  207.     telForwardFailed            = 2;                            { attempt to setup forwarding has failed}
  208. { DO NOT DISTURB TYPES }
  209.     telDNDIntExt                = 0;                            { do not disturb for all internal and external calls}
  210.     telDNDExternal                = 1;                            { do not disturb for external calls only }
  211.     telDNDInternal                = 2;                            { do not disturb for internal calls only }
  212.     telDNDNonIntercom            = 3;                            { do not disturb for all calls except intercom }
  213. { DO NOT DISTURB MESSAGES }
  214.     telDNDCleared                = 0;                            { do not disturb has been cleared }
  215.     telDNDEst                    = 1;                            { do not disturb has been established }
  216.     telDNDFailed                = 2;                            { attempt to setup do not disturb has failed }
  217. { VOICE MAIL MESSAGES }
  218.     telAllVoiceMessagesRead        = 0;                            { all messages have been read, none are  waiting 
  219.                                  * to be read }
  220.     telNewVoiceMessage            = 1;                            { a new message has arrived or messages are waiting 
  221.                                  * for this DN }
  222. { DNSELECT MESSAGE }
  223.     telDNDeselected                = 0;                            { DN has been deselected }
  224.     telDNSelected                = 1;                            { DN has been selected }
  225. { CALL ORIGINATORS }
  226.     telInternalCall                = 0;                            { return nth internal CA }
  227.     telExternalCall                = 1;                            { return nth external CA }
  228.     telUnknownCallOrigin        = 2;                            { unknown call type }
  229.     telAllCallOrigins            = 2;                            { return nth CA internal or external }
  230. { CALL TYPES }
  231.     telVoiceMailAccessOut        = 0+(-7);
  232.     telPageOut                    = 0+(-6);
  233.     telIntercomOut                = 0+(-5);
  234.     telCallbackOut                = 0+(-4);
  235.     telPickup                    = 0+(-3);
  236.     telParkRetrieve                = 0+(-2);
  237.     telNormalOut                = 0+(-1);
  238.     telUnknownCallType            = 0;
  239.     telNormalIn                    = 1;
  240.     telForwardedImmediate        = 2;
  241.     telForwardedBusy            = 3;
  242.     telForwardedNoAnswer        = 4;
  243.     telTransfer                    = 5;
  244.     telDeflected                = 6;
  245.     telIntercepted                = 7;
  246.     telDeflectRecall            = 8;
  247.     telParkRecall                = 9;
  248.     telTransferredRecall        = 10;
  249.     telIntercomIn                = 11;
  250.     telCallbackIn                = 12;
  251. { DIAL TYPES }
  252.     telDNDialable                = 0;                            { this DN could be dialed via TELSetupCall }
  253.     telDNNorthAmerican            = 1;                            { rmtDN is standard North America 10 digit number }
  254.     telDNInternational            = 2;                            { rmtDN is an international number }
  255.     telDNAlmostDialable            = 3;                            { rmtDN is almost dialable, }
  256. { missing prefix such as 9 or 1 }
  257.     telDNUnknown                = 15;                            { unknown whether DN is dialable }
  258. { CALL PROGRESS MESSAGES }
  259.     telCAPDialTone                = 1;                            { dial tone }
  260.     telCAPRinging                = 2;                            { destination CA is alerting }
  261.     telCAPDialing                = 3;                            { dialing the other end }
  262.     telCAPReorder                = 4;                            { reorder }
  263.     telCAPBusy                    = 5;                            { busy }
  264.     telCAPRouted                = 6;                            { call routed; rmtDN will hold the routing directory }
  265. { number routeDN and routePartyName have been updated }
  266.     telCAPRoutedOff                = 7;                            { call routed off-network; no further progress will }
  267. { be available }
  268.     telCAPTimeout                = 8;                            { call timed out }
  269.     telCAPUpdate                = 9;                            { name and rmtDN information has been updated }
  270.     telCAPPrompt                = 10;                            { the network is prompting for more information }
  271.     telCAPWaiting                = 11;                            { call is proceeding, but there is no response yet }
  272. { from the destination }
  273.     telCAPCPC                    = 12;                            { telephone tool detected CPC signal }
  274.     telCAPNoDialTone            = 13;                            { dial tone not detected }
  275.     telCAPUnknown                = 15;                            { call progress state unknown }
  276.     telCAPDialDisabled            = 16;                            { Blacklisting: Dial Disabled }
  277.     telCAPBlacklistedNumber        = 17;                            { Blacklisting: Blacklisted Number }
  278.     telCAPForbiddenNumber        = 18;                            { Blacklisting: Forbidden Number }
  279.     telCAPModemGuardTime        = 19;                            { Modem Guard Timein force, unable to dial }
  280.     telCAPLCDetected            = 20;                            { trying to dial a number while the handset is offhook }
  281.     telCAPLostLC                = 21;                            { trying manual dial or answer while handset not off hook 
  282.                                      * or also lost line current during dialing. }
  283. { OUTGOING CALL MESSAGES }
  284.     telPhysical                    = 0;                            { user lifted handset and initiated call }
  285.     telProgrammatic                = 1;                            { programmatic initiation of outgoing call }
  286. { DISCONNECT MESSAGES }
  287.     telLocalDisconnect            = 0;                            { local party, this user, responsible for disconnect }
  288.     telRemoteDisconnect            = 1;                            { remote party responsible for disconnect }
  289. { DISCONNECT TYPES }
  290.     telCADNormal                = 1;                            { normal disconnect }
  291.     telCADBusy                    = 2;                            { remote user busy }
  292.     telCADNoResponse            = 3;                            { remote not responding }
  293.     telCADRejected                = 4;                            { call rejected }
  294.     telCADNumberChanged            = 5;                            { number changed }
  295.     telCADInvalidDest            = 6;                            { invalid destination address }
  296.     telCADFacilityRejected        = 7;                            { requested facility rejected }
  297.     telCADUnobtainableDest        = 9;                            { destination not obtainable }
  298.     telCADCongested                = 10;                            { network congestion }
  299.     telCADIncompatibleDest        = 11;                            { incompatible destination }
  300.     telCADTimeout                = 12;                            { call timed out }
  301.     telCADUnknown                = 15;                            { reason unknown }
  302. { CONFERENCE MESSAGES }
  303.     telConferencePrepFailed        = 0;                            { conference could not be prepared }
  304.     telConferencePending        = 1;                            { conference prepared successfully }
  305.     telConferenceEstFailed        = 2;                            { conference could not be established }
  306.     telConferenceEst            = 3;                            { conference established }
  307. { TRANSFER MESSAGES }
  308.     telTransferPrepFailed        = 0;                            { transfer could not be prepared }
  309.     telTransferPending            = 1;                            { transfer prepared successfully }
  310.     telTransferEst                = 2;                            { consult or blind xfer successful }
  311.     telTransferFailed            = 3;                            { consult or blind xfer failed }
  312.     telTransferred                = 4;                            { message to originator of CA specifying 
  313.                                      * that call was transferred to rmtDN }
  314. { HOLD MESSAGES }
  315.     telHoldCleared                = 0;
  316.     telHoldEst                    = 1;
  317.     telHoldFailed                = 2;
  318. { RECEIVE DIGIT MESSAGES }
  319.     telDigitAudible                = 0;
  320.     telDigitNotAudible            = 1;
  321. { CALL PARK MESSAGES }
  322.     telCallParkEst                = 1;                            { call has been successfully parked }
  323.     telCallParkRetrieveEst        = 2;                            { parked Call has been successfully retrieved }
  324.     telCallParkFailed            = 3;                            { attempt to setup call park has failed }
  325.     telCallParkRetrieveFailed    = 4;                            { attempt to retrieve parked call failed }
  326.     telCallParkRecall            = 5;                            { call park has been recalled }
  327. { CALL BACK MESSAGES }
  328.     telCallbackCleared            = 0;                            { call back has been cleared }
  329.     telCallbackEst                = 1;                            { call back has been established }
  330.     telCallbackNowAvail            = 2;                            { call can be called back with TELCallBackNow }
  331. { if CA is zero, else call IS calling back on CA }
  332.     telCallbackFailed            = 3;                            { attempt to setup callback has failed }
  333.     telCallbackDesired            = 4;                            { a user has called this terminal, received no 
  334.                                      * answer and desires this terminal to call it 
  335.                                      * back }
  336.     telCallbackDesiredCleared    = 5;                            { call back for no answer no longer desired }
  337.     telCalledback                = 6;                            { callback has occurred successfully }
  338. { CALL REJECT MESSAGES }
  339.     telCallRejectFailed            = 0;                            { attempt to reject call has failed }
  340.     telCallRejectEst            = 1;                            { call successfully rejected }
  341.     telCallRejected                = 2;                            { message to originator that call was rejected }
  342. { CALL DEFLECT MESSAGES }
  343.     telCallDeflectFailed        = 0;                            { attempt to deflect call has failed }
  344.     telCallDeflectEst            = 1;                            { call successfully deflected }
  345.     telCallDeflectRecall        = 2;                            { deflected call has been recalled }
  346.     telCallDeflected            = 3;                            { message to originator that call was deflected 
  347.                                      * to rmtDN }
  348.     telAutoDeflectImmediate        = 4;                            { a call was automatically deflected from this 
  349.                                      * terminal as a result of immediate call 
  350.                                      * forwarding }
  351.     telAutoDeflectBusy            = 5;                            { a call was automatically deflected from this 
  352.                                      * terminal as a result of call forwarding on busy }
  353.     telAutoDeflectNoAnswer        = 6;                            { a call was automatically deflected from this 
  354.                                      * terminal as a result of call forwarding on 
  355.                                      * no answer }
  356. { CONFERENCE SPLIT MESSAGES }
  357.     telConferenceSplitFailed    = 0;                            { CA could not be split }
  358.     telConferenceSplitEst        = 1;                            { CA split successfully }
  359. { CONFERENCE DROP MESSAGES }
  360.     telConferenceDropFailed        = 0;                            { CA could not be dropped }
  361.     telConferenceDropped        = 1;                            { CA dropped successfully }
  362. { CALL PICKUP MESSAGES }
  363.     telCallPickupEst            = 0;                            { call pickup was successful }
  364.     telCallPickupFailed            = 1;                            { call pickup failed }
  365.     telCallPickedUp                = 2;                            { message to originator that call was picked 
  366.                                      * up at a different DN }
  367. { PAGING MESSAGES }
  368.     telPageEst                    = 0;                            { paging was successful }
  369.     telPageComplete                = 1;                            { paging activity completed }
  370.     telPageFailed                = 2;                            { paging failed }
  371. { INTERCOM MESSAGES }
  372.     telIntercomEst                = 0;                            { intercom was successful }
  373.     telIntercomComplete            = 1;                            { intercom activity completed }
  374.     telIntercomFailed            = 2;                            { intercom failed }
  375. { MODEM TONE MESSAGES }
  376.     telModemToneDetected        = 0;                            { modem tone was detected }
  377.     telModemToneCleared            = 1;                            { modem tone went away }
  378. { FAX TONE MESSAGES }
  379.     telFaxToneDetected            = 0;                            { fax tone was detected }
  380.     telFaxToneCleared            = 1;                            { fax tone went away }
  381. { IN USE MESSAGES }
  382.     telInUsePrivate                = 0;                            { MADN is in use and can't be accessed }
  383.     telInUseCanAccess            = 1;                            { MADN is in use, and others can access it 
  384.                                      * and join in }
  385.     telInUseCanMakePrivate        = 2;                            { MADN is in use, but available for any one
  386.                                      * person to access }
  387.     telInUseCleared                = 3;                            { MADN is no longer in use }
  388. { CALL APPEARANCE STATES }
  389.     telCAIdleState                = 0;                            { a call doesn't exist at this time }
  390.     telCAInUseState                = 1;                            { the call is active but at another terminal }
  391.     telCAOfferState                = 2;                            { a call is being offered to the terminal }
  392.     telCAQueuedState            = 3;                            { a call is being queued at this terminal }
  393.     telCAAlertingState            = 4;                            { a call is alerting at the terminal }
  394.     telCADialToneState            = 5;                            { initiated outgoing call has dialtone }
  395.     telCADialingState            = 6;                            { initiated outgoing call is dialing }
  396.     telCAWaitingState            = 7;                            { initiated outgoing call is waiting for
  397.                                      * response from destination }
  398.     telCARingingState            = 8;                            { the outgoing call is ringing. }
  399.     telCABusyState                = 9;                            { destination is busy or can't be reached }
  400.     telCAHeldState                = 10;                            { call has been put on hold by this terminal }
  401.     telCAConferencedState        = 11;                            { this CA is part of a conference now }
  402.     telCAActiveState            = 12;                            { the call is active and parties are free 
  403.                                      * to exchange data }
  404.     telCAReorderState            = 13;                            { CA is in a reorder state }
  405.     telCAConferencedHeldState    = 14;                            { CA is a conference call in a held state }
  406.     telCAUnknownState            = 15;                            { the call state is unknown }
  407. { TERMINAL MESSAGE EVENTMASKS }
  408.     telTermHookMsg                = $00000001;                    { the hookswitch state has changed }
  409.     telTermKeyMsg                = $00000002;                    { a phone pad key has been depressed }
  410.     telTermVolMsg                = $00000004;                    { volume setting has changed }
  411.     telTermDisplayMsg            = $00000008;                    { display has changed }
  412.     telTermEnableMsg            = $00000010;                    { terminal has become enabled }
  413.     telTermOpenMsg                = $00000020;                    { terminal has been opened }
  414.     telTermCloseMsg                = $00000040;                    { terminal is shutting down }
  415.     telTermResetMsg                = $00000080;                    { terminal has been reset }
  416.     telTermErrorMsg                = $00000100;                    { hard equipment error }
  417.     telTermIndHSStateChgMsg        = $00000200;                    { change in handset state from inacive to }
  418. { active or vice versa }
  419.     telTermIndHSConnectMsg        = $00000400;                    { independent handset connection has been changed }
  420.     telTermKeyImmMsg            = $00000800;                    { immidiate arrival of phone pad key }
  421.     telTermVolStateMsg            = $00001000;                    { volume state has changed }
  422.     telTermOtherMsg                = $80000000;                    { vendor defined error }
  423.     telAllTermMsgs                = $00001fff;                    { mask to all non tool specific terminal events }
  424. { DN MESSAGE EVENTMASK CONSTANTS }
  425.     telDNForwardMsg                = $00000001;                    { forward feature activity }
  426.     telDNDNDMsg                    = $00000002;                    { do not disturb feature activity }
  427.     telDNVoiceMailMsg            = $00000004;                    { message has arrived for this DN }
  428.     telDNSelectedMsg            = $00000008;                    { DN has been selected or deselected }
  429.     telDNOtherMsg                = $80000000;                    { a custom message for use by tools }
  430.     telAllDNMsgs                = $0000000f;                    { mask to all non tool specific dn events }
  431. { CA MESSAGE EVENTMASK CONSTANTS }
  432.     telCAAlertingMsg            = $00000001;                    { CA is alerting  }
  433.     telCAOfferMsg                = $00000002;                    { CA is being offered a call }
  434.     telCAProgressMsg            = $00000004;                    { call progress info for this CA }
  435.     telCAOutgoingMsg            = $00000008;                    { CA is initiating an outgoing call }
  436.     telCADisconnectMsg            = $00000010;                    { CA disconnected (dropped or rmt disc }
  437.     telCAActiveMsg                = $00000020;                    { CA is active and voice/data is free 
  438.                                              * to flow end to end }
  439.     telCAConferenceMsg            = $00000040;                    { conference activity on CA }
  440.     telCATransferMsg            = $00000080;                    { transfer feature activity }
  441.     telCAHoldMsg                = $00000100;                    { hold feature activity }
  442.     telCADigitsMsg                = $00000200;                    { remote signaling digits arrived }
  443.     telCACallParkMsg            = $00000400;                    { CA call park feature activity }
  444.     telCACallbackMsg            = $00000800;                    { CA call back feature activity  }
  445.     telCARejectMsg                = $00001000;                    { CA is rejected }
  446.     telCADeflectMsg                = $00002000;                    { CA is deflected }
  447.     telCAForwardMsg                = $00004000;                    { CA is forwarded to this DN  }
  448.     telCAConferenceSplitMsg        = $00008000;                    { conference split activity  }
  449.     telCAConferenceDropMsg        = $00010000;                    { conference drop activity  }
  450.     telCAQueuedMsg                = $00020000;                    { CA has been queued  }
  451.     telCAInUseMsg                = $00040000;                    { CA is in use  }
  452.     telCACallPickupMsg            = $00080000;                    { CA pickup activity }
  453.     telCAPagingMsg                = $00100000;                    { CA paging activity }
  454.     telCAIntercomMsg            = $00200000;                    { CA intercom activity }
  455.     telCAModemToneMsg            = $00400000;                    { modem tones detected }
  456.     telCAFaxToneMsg                = $00800000;                    { fax tones detected }
  457.     telCAIdleMsg                = $01000000;                    { CA is in idle state }
  458.     telCASuccessiveAlertMsg        = $02000000;                    { phone is alerting, one per ring }
  459.     telCAUserUserInfoMsg        = $04000000;                    { user to user information has arrrived 
  460.                                              * for this CA }
  461.     telCAHandOffMsg                = $08000000;                    { CA is ready for hand-off }
  462.     telCAVoiceDetectedMsg        = $10000000;                    { voice Detect related event }
  463.     telCASilenceDetectedMsg        = $20000000;                    { silence Detect related event }
  464.     telCADigitsImmMsg            = $40000000;                    { immidiate arrival of remote signaling digits }
  465.     telCAOtherMsg                = $80000000;                    { tool specific CA message }
  466.     telAllCAMsgs                = $7fffffff;                    { mask to all non tool specific CA events }
  467.  
  468.     
  469. TYPE
  470.     TELErr = OSErr;
  471.  
  472.     TELFlags = LONGINT;
  473.  
  474.  
  475. CONST
  476.     telNoMenus                    = 1 * (2**(16));                { tells tool not to display any custom menus }
  477.     telQuiet                    = 1 * (2**(17));                { tells tool not to display any dialog boxes or alerts }
  478.     telConfigChanged            = 1 * (2**(18));                { notifies application that the config has changed }
  479.  
  480.     
  481. TYPE
  482.     TELFeatureFlags = LONGINT;
  483.  
  484.  
  485. CONST
  486.     pcmAvail                    = 1 * (2**(0));                    { true if PCM voice data accessible }
  487.     hasHandset                    = 1 * (2**(1));                    { true if a phone handset is attached  }
  488.     hasSpeakerphone                = 1 * (2**(2));                    { true if a 2 way speakerphone is attached }
  489.     canOnHookDial                = 1 * (2**(3));                    { can on-hook dial }
  490.     hasRinger                    = 1 * (2**(4));                    { terminal has its own ringer }
  491.     canSetDisplay                = 1 * (2**(5));                    { application can write to the display }
  492.     hasKeypad                    = 1 * (2**(6));                    { attached phone has standard 12 key pad }
  493.     hasVideo                    = 1 * (2**(7));                    { terminal has a videophone }
  494.     hasOther                    = 1 * (2**(8));                    { reserved for future use }
  495.     crossDNConference            = 1 * (2**(9));                    { can perform cross-DN conferences }
  496.     hasSubaddress                = 1 * (2**(10));                { attached network supports subaddressing }
  497.     hasUserUserInfo                = 1 * (2**(11));                { network supports user-to-user info }
  498.     hasHandsetSoundStreams        = 1 * (2**(12));                { sound streams are supported on the handset }
  499.     hasIndHandset                = 1 * (2**(13));                { handset can be accessed independently of the phone line }
  500.     hasBuiltinSpeakerphone        = 1 * (2**(14));                { speaker and microphone of the Mac can be used }
  501.  
  502.  
  503. TYPE
  504.     TELTermRecord = RECORD
  505.         tRef:                    INTEGER;
  506.         featureFlags:            TELFeatureFlags;
  507.         handsetSpeakerVol:        INTEGER;
  508.         handsetMicVol:            INTEGER;
  509.         speakerphoneVol:        INTEGER;
  510.         speakerphoneMicVol:        INTEGER;
  511.         ringerVol:                INTEGER;
  512.         otherVol:                INTEGER;
  513.         ringerTypes:            INTEGER;
  514.         hasDisplay:                INTEGER;
  515.         displayRows:            INTEGER;
  516.         numDNs:                    INTEGER;
  517.         maxAllocCA:                INTEGER;
  518.         curAllocCA:                INTEGER;
  519.         builtinSpeakerVol:        INTEGER;
  520.         builtinSpeakerMicVol:    INTEGER;
  521.         reserved:                LONGINT;
  522.     END;
  523.  
  524.     TELTermPtr = ^TELTermRecord;
  525.  
  526.     TELRecord = RECORD
  527.         procID:                    INTEGER;
  528.         flags:                    TELFlags;
  529.         reserved:                INTEGER;
  530.         refCon:                    LONGINT;
  531.         userData:                LONGINT;
  532.         defproc:                UniversalProcPtr;
  533.         config:                    Ptr;
  534.         oldConfig:                Ptr;
  535.         pTELTerm:                TELTermPtr;
  536.         telPrivate:                LONGINT;
  537.         reserved1:                LONGINT;
  538.         reserved2:                LONGINT;
  539.         pTELTermSize:            LONGINT;
  540.         version:                INTEGER;
  541.     END;
  542.  
  543.     TELPtr = ^TELRecord;
  544.     TELHandle = ^TELPtr;
  545.  
  546.     TELDNFeatureFlags = LONGINT;
  547.  
  548.  
  549. CONST
  550.     dndSub                        = 1 * (2**(0));                    { do not disturb subscribed }
  551.     dndAvail                    = 1 * (2**(1));                    { do not disturb available }
  552.     dndActive                    = 1 * (2**(2));                    { do not disturb active }
  553.     voiceMailAccessSub            = 1 * (2**(3));                    { message waiting subscribed }
  554.     voiceMailAccessAvail        = 1 * (2**(4));                    { message waiting available }
  555.     voiceMailAccessActive        = 1 * (2**(5));                    { message waiting active }
  556.     pagingSub                    = 1 * (2**(6));                    { paging is subscribed }
  557.     pagingAvail                    = 1 * (2**(7));                    { paging is available }
  558.     pagingActive                = 1 * (2**(8));                    { paging is active }
  559.     intercomSub                    = 1 * (2**(9));                    { intercom is subscribed }
  560.     intercomAvail                = 1 * (2**(10));                { intercom is available }
  561.     intercomActive                = 1 * (2**(11));                { intercom is active }
  562.     dnSelectSub                    = 1 * (2**(12));                { DN select is subscribed }
  563.     dnSelectAvail                = 1 * (2**(13));                { DN select is available }
  564.     dnSelectActive                = 1 * (2**(14));                { DN is selected }
  565.     callPickupSub                = 1 * (2**(15));                { call pickup is subscribed }
  566.     callPickupAvail                = 1 * (2**(16));                { call pickup is available }
  567.     dnInUse                        = 1 * (2**(17));                { a CA is allocated for this DN }
  568.     logicalDN                    = 1 * (2**(18));                { this DN is not on this terminal }
  569.     dnAccessible                = 1 * (2**(19));                { commands can be sent to this DN }
  570.     canInitiate                    = 1 * (2**(20));                { an outgoing CA can be initiated }
  571.     voiceMessageWaiting            = 1 * (2**(21));                { voice mail waiting for this dn }
  572.     hasDNSoundStreams            = 1 * (2**(22));                { sound streams are supported on this DN }
  573.     autoAnswerAvail                = 1 * (2**(23));                { AutoAnswer is set for this DN }
  574.     autoAnswerActive            = 1 * (2**(24));                { AutoAnswer is currently applied to CA on this DN }
  575.     tollSaverAvail                = 1 * (2**(25));                { tollSaver is set for this DN }
  576.     tollSaverActive                = 1 * (2**(26));                { tollSaver is currently applied to CA on this DN }
  577.  
  578.     
  579. TYPE
  580.     TELDNForwardFlags = LONGINT;
  581.  
  582.  
  583. CONST
  584.     immediateForwardSub            = 1 * (2**(0));                    { immediate call forward subscribed }
  585.     immediateForwardAvail        = 1 * (2**(1));                    { immediate call forward available }
  586.     immediateForwardActive        = 1 * (2**(2));                    { immediate call forward active }
  587.     busyForwardSub                = 1 * (2**(3));                    { forward on busy subscribed }
  588.     busyForwardAvail            = 1 * (2**(4));                    { forward on busy available }
  589.     busyForwardActive            = 1 * (2**(5));                    { forward on busy active }
  590.     noAnswerForwardSub            = 1 * (2**(6));                    { no answer call forward subscribed }
  591.     noAnswerForwardAvail        = 1 * (2**(7));                    { no answer call forward available }
  592.     noAnswerForwardActive        = 1 * (2**(8));                    { no answer call forward active }
  593.     busyNAForwardSub            = 1 * (2**(9));                    { busy & no answer call forward subscribed }
  594.     busyNAForwardAvail            = 1 * (2**(10));                { busy & no answer call forward available }
  595.     busyNAForwardActive            = 1 * (2**(11));                { busy & no answer call forward active }
  596.  
  597.  
  598. TYPE
  599.     TELDNRecord = RECORD
  600.         dnRef:                    INTEGER;
  601.         dn:                        StringPtr;
  602.         dnPartyName:            StringPtr;
  603.         dnSubaddress:            StringPtr;
  604.         hTEL:                    TELHandle;
  605.         maxAllocCA:                INTEGER;
  606.         curAllocCA:                INTEGER;
  607.         dnType:                    INTEGER;
  608.         featureFlags:            TELDNFeatureFlags;
  609.         numPageIDs:                INTEGER;
  610.         numIntercomIDs:            INTEGER;
  611.         numPickupIDs:            INTEGER;
  612.         forwardFlags:            TELDNForwardFlags;
  613.         iForwardDN:                StringPtr;
  614.         iForwardSubaddress:        StringPtr;
  615.         iForwardPartyName:        StringPtr;
  616.         bForwardDN:                StringPtr;
  617.         bForwardSubaddress:        StringPtr;
  618.         bForwardPartyName:        StringPtr;
  619.         naForwardDN:            StringPtr;
  620.         naForwardSubaddress:    StringPtr;
  621.         naForwardPartyName:        StringPtr;
  622.         naForwardRings:            INTEGER;
  623.         telDNPrivate:            LONGINT;
  624.         refCon:                    LONGINT;
  625.         userData:                LONGINT;
  626.         reserved:                LONGINT;
  627.     END;
  628.  
  629.     TELDNPtr = ^TELDNRecord;
  630.     TELDNHandle = ^TELDNPtr;
  631.  
  632.     TELCAFeatureFlags = LONGINT;
  633.  
  634.  
  635. CONST
  636.     holdSub                        = 1 * (2**(0));                    { hold subscribed  }
  637.     holdAvail                    = 1 * (2**(1));                    { hold available  }
  638.     holdActive                    = 1 * (2**(2));                    { hold active  }
  639.     conferenceSub                = 1 * (2**(3));                    { conference subscribed }
  640.     conferenceAvail                = 1 * (2**(4));                    { conference available }
  641.     conferenceActive            = 1 * (2**(5));                    { conference active  }
  642.     conferenceDropSub            = 1 * (2**(6));                    { conference drop subscribed  }
  643.     conferenceDropAvail            = 1 * (2**(7));                    { a call to TELDrop will drop this 
  644.                                          * CA only from a conference }
  645.     conferenceSplitSub            = 1 * (2**(8));                    { conference split subscribed  }
  646.     conferenceSplitAvail        = 1 * (2**(9));                    { conference split available for this CA }
  647.     numToConferenceRequired        = 1 * (2**(10));                { the number of CAs to be conferenced is 
  648.                                          * required in TELConfPrep  }
  649.     transferSub                    = 1 * (2**(11));                { transfer subscribed  }
  650.     transferAvail                = 1 * (2**(12));                { transfer available  }
  651.     transferActive                = 1 * (2**(13));                { transfer active }
  652.     caRelated                    = 1 * (2**(14));                { this CA is the specified in some 
  653.                                          * other CA's relatedCA field  }
  654.  
  655.     
  656. TYPE
  657.     TELCAOtherFeatures = LONGINT;
  658.  
  659.  
  660. CONST
  661.     callbackSub                    = 1 * (2**(0));                    { call back subscribed }
  662.     callbackAvail                = 1 * (2**(1));                    { call back available }
  663.     callbackActive                = 1 * (2**(2));                    { call back active  }
  664.     callbackClearSub            = 1 * (2**(3));                    { call back clearing subscribed }
  665.     callbackNowSub                = 1 * (2**(4));                    { call back now subscribed }
  666.     callbackNowAvail            = 1 * (2**(5));                    { call back now available  }
  667.     callbackBusy                = 1 * (2**(6));                    { call back on busy }
  668.     callbackNoAnswer            = 1 * (2**(7));                    { call back on no answer }
  669.     callbackReturnsRef            = 1 * (2**(8));                    { call back returns a reference }
  670.     parkSub                        = 1 * (2**(9));                    { call park subscribed }
  671.     parkAvail                    = 1 * (2**(10));                { call park available }
  672.     parkActive                    = 1 * (2**(11));                { call park active }
  673.     parkRetrieveSub                = 1 * (2**(12));                { call park retrieve subscribed }
  674.     parkRetrieveWithID            = 1 * (2**(13));                { retrieve parked calls with IDs }
  675.     parkWithReturnedID            = 1 * (2**(14));                { RESERVED }
  676.     parkWithGivenID                = 1 * (2**(18));                { for switch that requires ID for parking }
  677.     rejectable                    = 1 * (2**(15));                { CA is rejectable  }
  678.     deflectable                    = 1 * (2**(16));                { CA is deflectable  }
  679.     acceptable                    = 1 * (2**(17));                { CA is acceptable }
  680.     voiceDetected                = 1 * (2**(19));                { voice has been detected on this CA incase of 
  681.                                                 an incoming call }
  682.     callAnswdTSRings            = 1 * (2**(20));                { incoimng call was answered on TollSaver rings }
  683.     progressHasDuration            = 1 * (2**(21));                { If set then telCAProgress messages sent to the CA message handler
  684.                                            carry the duration in milliseconds in the mType parameter.  If the
  685.                                            mType is zero that duration is unknown. }
  686.  
  687.     
  688. TYPE
  689.     TELCAPtr = ^TELCARecord;
  690.     TELCAHandle = ^TELCAPtr;
  691.  
  692.     TELCARecord = RECORD
  693.         caRef:                    INTEGER;
  694.         hTELDN:                    TELDNHandle;
  695.         hTEL:                    TELHandle;
  696.         caState:                INTEGER;
  697.         relatedCA:                TELCAHandle;
  698.         connectTime:            LONGINT;                                { can be used by application to keep track of connect time }
  699.         intExt:                    INTEGER;
  700.         callType:                INTEGER;
  701.         dialType:                INTEGER;
  702.         bearerType:                INTEGER;
  703.         rate:                    INTEGER;
  704.         rmtDN:                    StringPtr;
  705.         rmtPartyName:            StringPtr;
  706.         rmtSubaddress:            StringPtr;
  707.         routeDN:                StringPtr;
  708.         routePartyName:            StringPtr;
  709.         routeSubaddress:        StringPtr;
  710.         priority:                INTEGER;
  711.         conferenceLimit:        INTEGER;
  712.         featureFlags:            TELCAFeatureFlags;
  713.         otherFeatures:            TELCAOtherFeatures;
  714.         telCAPrivate:            LONGINT;
  715.         refCon:                    LONGINT;
  716.         userData:                LONGINT;
  717.         reserved:                LONGINT;
  718.     END;
  719.  
  720. { Constants for HandleType in structure above }
  721.  
  722. CONST
  723.     telHandleType                = 0;                            { feature requires a terminal handle }
  724.     telDNHandleType                = 1;                            { feature requires a DN handle }
  725.     telCAHandleType                = 2;                            { feature requires a CA handle }
  726.  
  727.  
  728. TYPE
  729.     FeatureList = RECORD
  730.         featureID:                INTEGER;
  731.         featureName:            StringPtr;
  732.         handleType:                INTEGER;
  733.         nextFeature:            ^FeatureList;
  734.     END;
  735.  
  736.     FeatureListPtr = ^FeatureList;
  737.  
  738. { CA MESSAGE STRUCTURES FOR MSGINFO }
  739.     CAGenericMsgRec = RECORD
  740.         rmtDN:                    StringPtr;
  741.         rmtName:                StringPtr;
  742.         rmtSubaddress:            StringPtr;
  743.         dialType:                INTEGER;
  744.     END;
  745.  
  746.     CAUserUserInfoMsgRec = RECORD
  747.         userUserInfo:            StringPtr;
  748.     END;
  749.  
  750.     CAConfMsgRec = RECORD
  751.         relatedCA:                TELCAHandle;
  752.     END;
  753.  
  754.     CATransfMsgRec = RECORD
  755.         rmtDN:                    StringPtr;
  756.         rmtName:                StringPtr;
  757.         rmtSubaddress:            StringPtr;
  758.         dialType:                INTEGER;
  759.         prepCA:                    TELCAHandle;
  760.     END;
  761.  
  762.     TelephoneTermMsgProcPtr = ProcPtr;  { PROCEDURE TelephoneTermMsg(hTEL: TELHandle; msg: LONGINT; mtype: INTEGER; value: INTEGER; globals: LONGINT); }
  763.     TelephoneDNMsgProcPtr = ProcPtr;  { PROCEDURE TelephoneDNMsg(hTELDN: TELDNHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; rmtDN: ConstStr255Param; rmtName: ConstStr255Param; rmtSubaddress: ConstStr255Param; globals: LONGINT); }
  764.     TelephoneCAMsgProcPtr = ProcPtr;  { PROCEDURE TelephoneCAMsg(hTELCA: TELCAHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; Msginfo: Ptr; globals: LONGINT); }
  765.     TelephoneChooseIdleProcPtr = ProcPtr;  { PROCEDURE TelephoneChooseIdle; }
  766.     TelephoneTermMsgUPP = UniversalProcPtr;
  767.     TelephoneDNMsgUPP = UniversalProcPtr;
  768.     TelephoneCAMsgUPP = UniversalProcPtr;
  769.     TelephoneChooseIdleUPP = UniversalProcPtr;
  770.  
  771. CONST
  772.     uppTelephoneTermMsgProcInfo = $0000EBC0; { PROCEDURE (4 byte param, 4 byte param, 2 byte param, 2 byte param, 4 byte param); }
  773.     uppTelephoneDNMsgProcInfo = $003FEBC0; { PROCEDURE (4 byte param, 4 byte param, 2 byte param, 2 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param); }
  774.     uppTelephoneCAMsgProcInfo = $0003EBC0; { PROCEDURE (4 byte param, 4 byte param, 2 byte param, 2 byte param, 4 byte param, 4 byte param); }
  775.     uppTelephoneChooseIdleProcInfo = $00000000; { PROCEDURE ; }
  776.  
  777. FUNCTION NewTelephoneTermMsgProc(userRoutine: TelephoneTermMsgProcPtr): TelephoneTermMsgUPP;
  778.     {$IFC NOT GENERATINGCFM }
  779.     INLINE $2E9F;
  780.     {$ENDC}
  781.  
  782. FUNCTION NewTelephoneDNMsgProc(userRoutine: TelephoneDNMsgProcPtr): TelephoneDNMsgUPP;
  783.     {$IFC NOT GENERATINGCFM }
  784.     INLINE $2E9F;
  785.     {$ENDC}
  786.  
  787. FUNCTION NewTelephoneCAMsgProc(userRoutine: TelephoneCAMsgProcPtr): TelephoneCAMsgUPP;
  788.     {$IFC NOT GENERATINGCFM }
  789.     INLINE $2E9F;
  790.     {$ENDC}
  791.  
  792. FUNCTION NewTelephoneChooseIdleProc(userRoutine: TelephoneChooseIdleProcPtr): TelephoneChooseIdleUPP;
  793.     {$IFC NOT GENERATINGCFM }
  794.     INLINE $2E9F;
  795.     {$ENDC}
  796.  
  797. PROCEDURE CallTelephoneTermMsgProc(hTEL: TELHandle; msg: LONGINT; mtype: INTEGER; value: INTEGER; globals: LONGINT; userRoutine: TelephoneTermMsgUPP);
  798.     {$IFC NOT GENERATINGCFM}
  799.     INLINE $205F, $4E90;
  800.     {$ENDC}
  801.  
  802. PROCEDURE CallTelephoneDNMsgProc(hTELDN: TELDNHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; rmtDN: ConstStr255Param; rmtName: ConstStr255Param; rmtSubaddress: ConstStr255Param; globals: LONGINT; userRoutine: TelephoneDNMsgUPP);
  803.     {$IFC NOT GENERATINGCFM}
  804.     INLINE $205F, $4E90;
  805.     {$ENDC}
  806.  
  807. PROCEDURE CallTelephoneCAMsgProc(hTELCA: TELCAHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; Msginfo: Ptr; globals: LONGINT; userRoutine: TelephoneCAMsgUPP);
  808.     {$IFC NOT GENERATINGCFM}
  809.     INLINE $205F, $4E90;
  810.     {$ENDC}
  811.  
  812. PROCEDURE CallTelephoneChooseIdleProc(userRoutine: TelephoneChooseIdleUPP);
  813.     {$IFC NOT GENERATINGCFM}
  814.     INLINE $205F, $4E90;
  815.     {$ENDC}
  816.  
  817. FUNCTION InitTEL: TELErr;
  818. FUNCTION TELGetInfo(hTEL: TELHandle): TELErr;
  819. FUNCTION TELOpenTerm(hTEL: TELHandle): TELErr;
  820. FUNCTION TELResetTerm(hTEL: TELHandle): TELErr;
  821. FUNCTION TELCloseTerm(hTEL: TELHandle): TELErr;
  822. FUNCTION TELTermMsgHand(hTEL: TELHandle; eventMask: LONGINT; msgProc: TelephoneTermMsgUPP; globals: LONGINT): TELErr;
  823. FUNCTION TELClrTermMsgHand(hTEL: TELHandle; msgProc: TelephoneTermMsgUPP): TELErr;
  824. FUNCTION TELTermEventsSupp(hTEL: TELHandle; VAR eventMask: LONGINT): TELErr;
  825. FUNCTION TELGetProcID(VAR name: Str255): INTEGER;
  826. FUNCTION TELNew(procID: INTEGER; flags: TELFlags; refCon: LONGINT; userData: LONGINT): TELHandle;
  827. FUNCTION TELNewWithResult(procID: INTEGER; flags: TELFlags; refCon: LONGINT; userData: LONGINT; VAR error: TELErr): TELHandle;
  828. FUNCTION TELDefault(VAR theConfig: Ptr; procID: INTEGER; allocate: BOOLEAN): TELErr;
  829. FUNCTION TELValidate(hTEL: TELHandle): BOOLEAN;
  830. FUNCTION TELGetConfig(hTEL: TELHandle): Ptr;
  831. FUNCTION TELSetConfig(hTEL: TELHandle; thePtr: Ptr): INTEGER;
  832. FUNCTION TELChoose(VAR hTEL: TELHandle; where: Point; idleProc: TelephoneChooseIdleUPP): TELErr;
  833. FUNCTION TELSetupPreflight(procID: INTEGER; VAR magicCookie: LONGINT): Handle;
  834. PROCEDURE TELSetupSetup(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR magicCookie: LONGINT);
  835. FUNCTION TELSetupFilter(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR theEvent: EventRecord; VAR theItem: INTEGER; VAR magicCookie: LONGINT): BOOLEAN;
  836. PROCEDURE TELSetupItem(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR theItem: INTEGER; VAR magicCookie: LONGINT);
  837. PROCEDURE TELSetupCleanup(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR magicCookie: LONGINT);
  838. PROCEDURE TELSetupXCleanup(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; OKed: BOOLEAN; VAR magicCookie: LONGINT);
  839. PROCEDURE TELSetupPostflight(procID: INTEGER);
  840. FUNCTION TELDispose(hTEL: TELHandle): TELErr;
  841. FUNCTION TELCountDNs(hTEL: TELHandle; dnType: INTEGER; physical: BOOLEAN): INTEGER;
  842. FUNCTION TELDNLookupByIndex(hTEL: TELHandle; dnType: INTEGER; physical: BOOLEAN; index: INTEGER; VAR hTELDN: TELDNHandle): TELErr;
  843. FUNCTION TELDNLookupByName(hTEL: TELHandle; DN: ConstStr255Param; VAR hTELDN: TELDNHandle): TELErr;
  844. FUNCTION TELDNSelect(hTELDN: TELDNHandle; select: BOOLEAN): TELErr;
  845. FUNCTION TELDNDispose(hTELDN: TELDNHandle): TELErr;
  846. FUNCTION TELGetDNInfo(hTELDN: TELDNHandle): TELErr;
  847. FUNCTION TELGetDNFlags(hTELDN: TELDNHandle; VAR dnFeatureFlags: LONGINT; VAR dnForwardFlags: LONGINT): TELErr;
  848. FUNCTION TELDNMsgHand(hTELDN: TELDNHandle; allDNs: BOOLEAN; eventMask: LONGINT; msgProc: TelephoneDNMsgUPP; globals: LONGINT): TELErr;
  849. FUNCTION TELClrDNMsgHand(hTELDN: TELDNHandle; msgProc: TelephoneDNMsgUPP): TELErr;
  850. FUNCTION TELDNEventsSupp(hTELDN: TELDNHandle; VAR eventMask: LONGINT): TELErr;
  851. FUNCTION TELCountCAs(hTELDN: TELDNHandle; internalExternal: INTEGER): INTEGER;
  852. FUNCTION TELCALookup(hTELDN: TELDNHandle; internalExternal: INTEGER; index: INTEGER; VAR hTELCA: TELCAHandle): TELErr;
  853. FUNCTION TELCADispose(hTELCA: TELCAHandle): TELErr;
  854. FUNCTION TELGetCAState(hTELCA: TELCAHandle; VAR state: INTEGER): TELErr;
  855. FUNCTION TELGetCAFlags(hTELCA: TELCAHandle; VAR caFeatureFlags: LONGINT; VAR caOtherFeatures: LONGINT): TELErr;
  856. FUNCTION TELGetCAInfo(hTELCA: TELCAHandle): TELErr;
  857. FUNCTION TELCAMsgHand(hTELDN: TELDNHandle; eventMask: LONGINT; msgProc: TelephoneCAMsgUPP; globals: LONGINT): TELErr;
  858. FUNCTION TELClrCAMsgHand(hTELDN: TELDNHandle; msgProc: TelephoneCAMsgUPP): TELErr;
  859. FUNCTION TELCAEventsSupp(hTELDN: TELDNHandle; VAR eventMask: LONGINT): TELErr;
  860. FUNCTION TELSetupCall(hTELDN: TELDNHandle; VAR hTELCA: TELCAHandle; destDN: ConstStr255Param; destName: ConstStr255Param; destSubaddress: ConstStr255Param; userUserInfo: ConstStr255Param; bearerType: INTEGER; rate: INTEGER): TELErr;
  861. FUNCTION TELConnect(hTELCA: TELCAHandle): TELErr;
  862. FUNCTION TELDialDigits(hTELCA: TELCAHandle; digits: ConstStr255Param): TELErr;
  863. FUNCTION TELAcceptCall(hTELCA: TELCAHandle): TELErr;
  864. FUNCTION TELRejectCall(hTELCA: TELCAHandle; reason: INTEGER): TELErr;
  865. FUNCTION TELDeflectCall(hTELCA: TELCAHandle; rmtDN: ConstStr255Param; rmtName: ConstStr255Param; rmtSubaddress: ConstStr255Param): TELErr;
  866. FUNCTION TELAnswerCall(hTELCA: TELCAHandle): TELErr;
  867. FUNCTION TELDrop(hTELCA: TELCAHandle; userUserInfo: ConstStr255Param): TELErr;
  868. FUNCTION TELHold(hTELCA: TELCAHandle): TELErr;
  869. FUNCTION TELRetrieve(hTELCA: TELCAHandle): TELErr;
  870. FUNCTION TELConferencePrep(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle; numToConference: INTEGER): TELErr;
  871. FUNCTION TELConferenceEstablish(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
  872. FUNCTION TELConferenceSplit(hTELCA: TELCAHandle): TELErr;
  873. FUNCTION TELTransferPrep(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
  874. FUNCTION TELTransferEstablish(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
  875. FUNCTION TELTransferBlind(hTELCA: TELCAHandle; rmtDN: ConstStr255Param; rmtName: ConstStr255Param; rmtSubaddress: ConstStr255Param): TELErr;
  876. FUNCTION TELForwardSet(hTELDN: TELDNHandle; forwardDN: ConstStr255Param; forwardName: ConstStr255Param; forwardSubaddress: ConstStr255Param; forwardType: INTEGER; numrings: INTEGER): TELErr;
  877. FUNCTION TELForwardClear(hTELDN: TELDNHandle; forwardType: INTEGER): TELErr;
  878. FUNCTION TELCallbackSet(hTELCA: TELCAHandle; VAR callbackRef: INTEGER): TELErr;
  879. FUNCTION TELCallbackClear(hTEL: TELHandle; callbackRef: INTEGER): TELErr;
  880. FUNCTION TELCallbackNow(hTELCA: TELCAHandle; callbackRef: INTEGER): TELErr;
  881. FUNCTION TELDNDSet(hTELDN: TELDNHandle; dndType: INTEGER): TELErr;
  882. FUNCTION TELDNDClear(hTELDN: TELDNHandle; dndType: INTEGER): TELErr;
  883. FUNCTION TELCallPickup(hTELCA: TELCAHandle; pickupDN: ConstStr255Param; pickupGroupID: INTEGER): TELErr;
  884. FUNCTION TELParkCall(hTELCA: TELCAHandle; VAR parkRetrieveID: StringPtr; parkID: ConstStr255Param): TELErr;
  885. FUNCTION TELRetrieveParkedCall(hTELCA: TELCAHandle; parkRetrieveID: ConstStr255Param): TELErr;
  886. FUNCTION TELVoiceMailAccess(hTELCA: TELCAHandle): TELErr;
  887. FUNCTION TELPaging(hTELCA: TELCAHandle; pageID: INTEGER): TELErr;
  888. FUNCTION TELIntercom(hTELCA: TELCAHandle; intercomID: INTEGER): TELErr;
  889. FUNCTION TELOtherFeatureList(hTEL: TELHandle; VAR fList: FeatureListPtr): TELErr;
  890. FUNCTION TELOtherFeatureImplement(hTEL: TELHandle; theHandle: Handle; featureID: INTEGER): TELErr;
  891. FUNCTION TELToolFunctions(hTEL: TELHandle; msgcode: INTEGER; VAR supportsIt: BOOLEAN): TELErr;
  892. FUNCTION TELOtherFunction(hTEL: TELHandle; paramblock: Ptr; size: LONGINT): TELErr;
  893. FUNCTION TELGetHooksw(hTEL: TELHandle; hookType: INTEGER; VAR offHook: BOOLEAN): TELErr;
  894. FUNCTION TELSetHooksw(hTEL: TELHandle; hookType: INTEGER; offHook: BOOLEAN): TELErr;
  895. FUNCTION TELGetVolume(hTEL: TELHandle; volType: INTEGER; VAR level: INTEGER; VAR volState: INTEGER): TELErr;
  896. FUNCTION TELSetVolume(hTEL: TELHandle; volType: INTEGER; VAR level: INTEGER; volState: INTEGER): TELErr;
  897. FUNCTION TELAlert(hTEL: TELHandle; VAR level: INTEGER; alertPattern: INTEGER): TELErr;
  898. FUNCTION TELGetDisplay(hTEL: TELHandle; index: INTEGER; VAR displayMode: INTEGER; VAR text: StringPtr): TELErr;
  899. FUNCTION TELSetDisplay(hTEL: TELHandle; index: INTEGER; displayMode: INTEGER; text: ConstStr255Param): TELErr;
  900. PROCEDURE TELIdle(hTEL: TELHandle);
  901. PROCEDURE TELActivate(hTEL: TELHandle; activate: BOOLEAN);
  902. PROCEDURE TELResume(hTEL: TELHandle; resume: BOOLEAN);
  903. FUNCTION TELMenu(hTEL: TELHandle; menuID: INTEGER; item: INTEGER): BOOLEAN;
  904. PROCEDURE TELEvent(hTEL: TELHandle; {CONST}VAR theEvent: EventRecord);
  905. PROCEDURE TELGetToolName(procID: INTEGER; VAR name: Str255);
  906. FUNCTION TELGetVersion(hTEL: TELHandle): Handle;
  907. FUNCTION TELGetTELVersion: INTEGER;
  908. FUNCTION TELIntlToEnglish(hTEL: TELHandle; inputPtr: Ptr; VAR outputPtr: Ptr; language: INTEGER): TELErr;
  909. FUNCTION TELEnglishToIntl(hTEL: TELHandle; inputPtr: Ptr; VAR outputPtr: Ptr; language: INTEGER): TELErr;
  910. FUNCTION TELGetDNSoundInput(hTELDN: TELDNHandle; VAR deviceName: Str255): TELErr;
  911. FUNCTION TELDisposeDNSoundInput(hTELDN: TELDNHandle; deviceName: ConstStr255Param): TELErr;
  912. FUNCTION TELGetDNSoundOutput(hTELDN: TELDNHandle; VAR SndOut: Component): TELErr;
  913. FUNCTION TELDisposeDNSoundOutput(hTELDN: TELDNHandle; SndOut: Component): TELErr;
  914. FUNCTION TELGetHSSoundInput(termHand: TELHandle; VAR deviceName: Str255): TELErr;
  915. FUNCTION TELDisposeHSSoundInput(termHand: TELHandle; deviceName: ConstStr255Param): TELErr;
  916. FUNCTION TELGetHSSoundOutput(termHand: TELHandle; VAR SndOut: Component): TELErr;
  917. FUNCTION TELDisposeHSSoundOutput(termHand: TELHandle; SndOut: Component): TELErr;
  918. FUNCTION TELDNSetAutoAnswer(hTELDN: TELDNHandle; AutoAnswerOn: BOOLEAN): TELErr;
  919. FUNCTION TELDNTollSaverControl(hTELDN: TELDNHandle; QuickAnswer: BOOLEAN): TELErr;
  920. FUNCTION TELSetIndHSConnect(termHand: TELHandle; Connect: BOOLEAN): TELErr;
  921. FUNCTION TELGetIndHSConnect(termHand: TELHandle; VAR Connect: BOOLEAN): TELErr;
  922. FUNCTION TELCAVoiceDetect(hTELCA: TELCAHandle; VoiceDetectOn: BOOLEAN): TELErr;
  923. FUNCTION TELCASilenceDetect(hTELCA: TELCAHandle; DetectOn: BOOLEAN; Period: LONGINT): TELErr;
  924. FUNCTION TELGetTelNewErr: TELErr;
  925. FUNCTION TELDNSetDTMF(hTELDN: TELDNHandle; dtmfOn: BOOLEAN): TELErr;
  926. FUNCTION TELDNGetDTMF(hTELDN: TELDNHandle; VAR dtmfOn: BOOLEAN): TELErr;
  927. FUNCTION TELHSSetDTMF(termHand: TELHandle; dtmfOn: BOOLEAN): TELErr;
  928. FUNCTION TELHSGetDTMF(termHand: TELHandle; VAR dtmfOn: BOOLEAN): TELErr;
  929. FUNCTION TELGetDNStatus(hTELDN: TELDNHandle; VAR inUse: LONGINT): TELErr;
  930. FUNCTION TELGetDNProgressDet(hTELDN: TELDNHandle; selector: LONGINT; VAR prgDetOn: BOOLEAN): TELErr;
  931. FUNCTION TELSetDNProgressDet(hTELDN: TELDNHandle; selector: LONGINT; prgDetOn: BOOLEAN): TELErr;
  932.  
  933. {$ALIGN RESET}
  934. {$POP}
  935.  
  936. {$SETC UsingIncludes := TelephonesIncludes}
  937.  
  938. {$ENDC} {__TELEPHONES__}
  939.  
  940. {$IFC NOT UsingIncludes}
  941.  END.
  942. {$ENDC}
  943.